UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0M7Y4yCha6cXVFtwUPw3/DVQvU4SaHfWK0PvXI1hBBY='
WHERE
key_id = 'fe984017b134ca43e0c00eef4d7954d360906d9495e6dbb78b3f15d350c0e0ad'
AND (
token = '0M7Y4yCha6cXVFtwUPw3/DVQvU4SaHfWK0PvXI1hBBY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)