UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YuzszQ2F4Bn4a52dyQv/CVDRr7Sr1iBBPIWKxs+tCO4='
WHERE
key_id = '4f1edf65249af0cfa5386ca4c4bdb70b894b09ad070546ebe5e946ee1f7a018b'
AND (
token = 'YuzszQ2F4Bn4a52dyQv/CVDRr7Sr1iBBPIWKxs+tCO4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)