UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U25NerXiavhrOjAIYR4+e+6+Lhs/XgwjAxgLOYTbcls=' 
WHERE 
  key_id = '1eb4e2e9d5149e9f28ad44466e88ae59f5fa3af88d92dc6c100493d6705162c6' 
  AND (
    token = 'U25NerXiavhrOjAIYR4+e+6+Lhs/XgwjAxgLOYTbcls=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029