UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TOl6L2IJxTt6pQ9JiC7e5e2AmJLYAUVw6k4rq/ooUUA='
WHERE
key_id = '94ba75d74dbf1ce83a85b236537285f26545336d755b43d47f93a870f646cc89'
AND (
token = 'TOl6L2IJxTt6pQ9JiC7e5e2AmJLYAUVw6k4rq/ooUUA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)