UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4ZxYo8KtxR+18mXGC7QUJgXW5EetgGeGo8O6tpSu4jM='
WHERE
key_id = '6adcb2de849ca9b19d2dcf4052e2a36b9458d284b133719a0129a22a3646b142'
AND (
token = '4ZxYo8KtxR+18mXGC7QUJgXW5EetgGeGo8O6tpSu4jM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)