UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bpzJ8r9+VY3YJTJB5GRIUqmJ5frECzK0La/kcLT66wY='
WHERE
key_id = '92efce5642846de92e65c0aafc2ee73895621981bb5c514363b72a19fc642798'
AND (
token = 'bpzJ8r9+VY3YJTJB5GRIUqmJ5frECzK0La/kcLT66wY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)