UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DArTizjD09Is8rMvvf+J1d94028lSTB2SndUXeusJD4='
WHERE
key_id = '3d2bccc5d9bd6def36356a5afc286fb9d2e46817705e94c728fd2c98a73dc54d'
AND (
token = 'DArTizjD09Is8rMvvf+J1d94028lSTB2SndUXeusJD4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)