UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RWOiEkWaNoHfG8RLMbAmo177CEY503Nsr6MMkIwMEn4=' 
WHERE 
  key_id = '7468485d1e56f70ca90daaf6f56cd3cb7e4f60576f013a828ec4bea98927ccb3' 
  AND (
    token = 'RWOiEkWaNoHfG8RLMbAmo177CEY503Nsr6MMkIwMEn4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022