UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6HDAP181FX6VvK23pd/5UbAUgnsYMbDuleJBiLWgURE='
WHERE
key_id = 'b0214c1eaca8fae1ec5aba0bab549d7b8daed2186f56b5ea2c885b5664cc572c'
AND (
token = '6HDAP181FX6VvK23pd/5UbAUgnsYMbDuleJBiLWgURE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)