UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8wbQGPcrFKDpry8kJ5eA9q41QXPZltUD4syY/Z09uJI=' 
WHERE 
  key_id = 'eebfbf7b9651dd69889c01d6e8a8ab0961965f281b7a01c22473bb0e6706a7e0' 
  AND (
    token = '8wbQGPcrFKDpry8kJ5eA9q41QXPZltUD4syY/Z09uJI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030