UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eBIFY2nuHPx6/0YhBYind9qX9CSxxycr9HNHR86VJsQ='
WHERE
key_id = '48aa42a0f12e75a5c6f890ede1e348ef67b20b7edeec64bb7ac7ef05b4894d30'
AND (
token = 'eBIFY2nuHPx6/0YhBYind9qX9CSxxycr9HNHR86VJsQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)