UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'js4ZO+qMHpH186I9F6dwNVvTvsobISu9JIt7j6txv3A='
WHERE
key_id = '15df0879a214e83891d56cc5ec98bf1e7df7a1471c45a72527757c159e5d6ee8'
AND (
token = 'js4ZO+qMHpH186I9F6dwNVvTvsobISu9JIt7j6txv3A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)