UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XELM5MZgzidH6QDVjAzvo5RcEc3/J/vHnQRtcwkB4LU='
WHERE
key_id = '5bcbdba0a9d57e0d7e07a2d802f8cc671a7a0377c32b22a520794202b8bd9670'
AND (
token = 'XELM5MZgzidH6QDVjAzvo5RcEc3/J/vHnQRtcwkB4LU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)