UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ehQLAX+RW33YhpDD/lm/0pYu1OJ6lEpwSQbIzaOqeVk=' 
WHERE 
  key_id = 'bac53bed325d08c4b193581dcf6ce096423b1d30adff4664d4bcde4390c176ac' 
  AND (
    token = 'ehQLAX+RW33YhpDD/lm/0pYu1OJ6lEpwSQbIzaOqeVk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040