UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nKbmQdBBnmSRWK5WHbURXXbUBIGN732+NyeXJR544e0=' 
WHERE 
  key_id = '0d37fd2c54acf09947d9aa67715048bcaf55139d5f8cf3a4f112b2791bd75a1c' 
  AND (
    token = 'nKbmQdBBnmSRWK5WHbURXXbUBIGN732+NyeXJR544e0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019