UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Pt4EyAcshS+BR66fCmWtLMcsYUpRhPJ/h2aH01g63Nk='
WHERE
key_id = 'fbe6cc39d7dcb9fa5c270c3b7d4353ef7642e6ebbd4714fd9f5661f1136e662a'
AND (
token = 'Pt4EyAcshS+BR66fCmWtLMcsYUpRhPJ/h2aH01g63Nk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)