UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '++6R0kNMJPZVySM8DGC7Igz/LAOxqqu9GZjIbXhjRsM='
WHERE
key_id = '35fc34ef053932586ee83aa9b5ea62e209e35f798f0fefbd31a08e0cd3e26790'
AND (
token = '++6R0kNMJPZVySM8DGC7Igz/LAOxqqu9GZjIbXhjRsM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)