UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9GZWF5C5JBLMAl/Xu7gP/5i8eMjtw3ct2UoW56LanF4=' 
WHERE 
  key_id = 'eab66cee18d2c327b243e58c55f265599c8693a8912777eb454ed262e5248e2f' 
  AND (
    token = '9GZWF5C5JBLMAl/Xu7gP/5i8eMjtw3ct2UoW56LanF4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016