UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TAZrZcl8wnkUnOzvuea9tzNc4I94wZHaxk/JIzwhIqw='
WHERE
key_id = '73638602693742ecef1e106ad844e77865cf2a70643e8fa78183430456fc219c'
AND (
token = 'TAZrZcl8wnkUnOzvuea9tzNc4I94wZHaxk/JIzwhIqw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)