UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1eOaoLC2r8s2Mc/apRXi7l5Kv1dRxkkrvbD/hGEIt10='
WHERE
key_id = '1895da4c5e128c2b8ef6f11a46f1eef3ba5f0a1d68c3bc25cb94ba593d84a7c9'
AND (
token = '1eOaoLC2r8s2Mc/apRXi7l5Kv1dRxkkrvbD/hGEIt10='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)