UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '43aBhq7N6OUaY3+/YV1GvwKVuThvL8wlR+knmoq8wgI='
WHERE
key_id = '716ed6fe476005de791df5423d1d04a3f32f16dcfb1afb4460be523b27d15c09'
AND (
token = '43aBhq7N6OUaY3+/YV1GvwKVuThvL8wlR+knmoq8wgI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)