UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qFMABrCB+FE/YQ/RLQWl04jtsup9WN+evY6kH38Itsg=' 
WHERE 
  key_id = '56835768ad642cae3148c44ef2ffefb6d54c899b06d98ccc7d89eef481e7c872' 
  AND (
    token = 'qFMABrCB+FE/YQ/RLQWl04jtsup9WN+evY6kH38Itsg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022