UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sRxCFFDlq3L9ZdFtRAn7ZdfRmOZFUB+Rvr8n9VQBxMM=' 
WHERE 
  key_id = '26872155c6bbf27aff33eec9cff7f1cf0de3fb8774c024faf48bfb46be470bff' 
  AND (
    token = 'sRxCFFDlq3L9ZdFtRAn7ZdfRmOZFUB+Rvr8n9VQBxMM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021