UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GZL+YshHbquE9E53R4CkTGi0/qi5vMFeXDnfJOR8v44='
WHERE
key_id = '6ac43086560a50a2b1986bf0f7467cabe44ef9724eee83f23a6c42b19456cd5a'
AND (
token = 'GZL+YshHbquE9E53R4CkTGi0/qi5vMFeXDnfJOR8v44='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)