UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iTQ/0H4BVRiBOBZtkxD7D7Rz59z//HJg4Qu4ePew1EU='
WHERE
key_id = 'c4a1ea0ae2a91ebe0b5959d291b1f82e051d66d737891c56fd9830cb783b5bfa'
AND (
token = 'iTQ/0H4BVRiBOBZtkxD7D7Rz59z//HJg4Qu4ePew1EU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)