UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cJSetedVGsm0CMxKWSLr6g+jZOmgSfgs1WdNmffXl2E=' 
WHERE 
  key_id = '267af757ecd85214ae0b32db2c085ddb91bdafcf0ac9adff10359b5e7253545c' 
  AND (
    token = 'cJSetedVGsm0CMxKWSLr6g+jZOmgSfgs1WdNmffXl2E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021