UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'en2lGX22r6C18NrCNTzDzVGKV4lGeodMEfJ/wFukCcg=' 
WHERE 
  key_id = 'a09caffb9650147ce64b20c2ca5bbc61a5b2f19eeff7c35dd084e130325b1b81' 
  AND (
    token = 'en2lGX22r6C18NrCNTzDzVGKV4lGeodMEfJ/wFukCcg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038