UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vosPkFT5PtiVY/V1TQ6vMhSCFdgknqFu899jkaPrBb4='
WHERE
key_id = 'fdcc2ddf008e8a47e098d9e321f11dbb03657144fbdb3b650dfc0dc9f26c55a8'
AND (
token = 'vosPkFT5PtiVY/V1TQ6vMhSCFdgknqFu899jkaPrBb4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)