UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ujEo32uhVRg2QTLE5X9Z/X7XNsomOjKQcIcXfDQEWxQ=' 
WHERE 
  key_id = '802c601b6a78a3c4ac15f86284dfc957868548c21b26f08bfcfc4c788ebe2b1b' 
  AND (
    token = 'ujEo32uhVRg2QTLE5X9Z/X7XNsomOjKQcIcXfDQEWxQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019