UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EPnWkIa/L0jUiZsPJozIY5RB3pEERX0MofleNQX1eNw='
WHERE
key_id = 'db3c43357d37babe42aa3b071a6f3d580d46663069c6dc9e83b9ea2b60ab294e'
AND (
token = 'EPnWkIa/L0jUiZsPJozIY5RB3pEERX0MofleNQX1eNw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)