UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '35fJyqSFjHWU2SCk/tt/760iuM0WoSLd/n6dfGjYW4w='
WHERE
key_id = 'aeb87f0cc2e607183da3429686ebddce69dd093646556fae791a6065869a9366'
AND (
token = '35fJyqSFjHWU2SCk/tt/760iuM0WoSLd/n6dfGjYW4w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)