UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2vCEiczj2/mPFKhCPzYvdgvKcV4RNMoUpU5/SR9amDg='
WHERE
key_id = '928b26a96f20d33c6475ba59b02f51eda2968f94f135bd13ab6d11c387996ab4'
AND (
token = '2vCEiczj2/mPFKhCPzYvdgvKcV4RNMoUpU5/SR9amDg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)