UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nOkGQrWG40F42JFFmwo7VdDTj9UQMArU/py4/Eo6SV0=' 
WHERE 
  key_id = 'cd67e6b3fde8d337d56b2f4d049c63a366f0b50c61758c8f0e7ce637e98be133' 
  AND (
    token = 'nOkGQrWG40F42JFFmwo7VdDTj9UQMArU/py4/Eo6SV0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039