UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'svc3lpJhC8Nni/DyJE0PRAccEi+Km02IbDzGhNgLHf0='
WHERE
key_id = '261f4de4cc3f25af765622320269ef5f395523c0c9cea75387f9a11655118d84'
AND (
token = 'svc3lpJhC8Nni/DyJE0PRAccEi+Km02IbDzGhNgLHf0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)