UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mKIsMT125CpgZ5kfEEmdkReYGeGi2SXmfZmIKD/gsRw=' 
WHERE 
  key_id = '97fd5beb929d6dd7f9b51d246b271e9daf50badaa4091022290246fd34d8b6e5' 
  AND (
    token = 'mKIsMT125CpgZ5kfEEmdkReYGeGi2SXmfZmIKD/gsRw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033