UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hzco5AYcJr+wGxlHVD8EPME1Fn9T5OaUOq5hLGfCe6U='
WHERE
key_id = '98fbd714ecac0e8eb5f9fae0c6834842dcd0af1875fed926ca812a7b79019979'
AND (
token = 'Hzco5AYcJr+wGxlHVD8EPME1Fn9T5OaUOq5hLGfCe6U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)