UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aa154EOXHlGR3dsYsZ5U0Eig1sOS4BExO4rq8Lvx9YY='
WHERE
key_id = '55dd4f0ab334d6eb90f45569171459afd3d8a3bc9dfffa726e929787d1135f47'
AND (
token = 'aa154EOXHlGR3dsYsZ5U0Eig1sOS4BExO4rq8Lvx9YY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)