UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/32n0VCQUXzeUXyRrF+YVqFkiRY4LMV573yF2l0RiEw=' 
WHERE 
  key_id = '969a1704239e78185f8775ae55f87edfdad1315ce939ba40950e987a555c7252' 
  AND (
    token = '/32n0VCQUXzeUXyRrF+YVqFkiRY4LMV573yF2l0RiEw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039