UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9ZaDNQqZgbr4WorUskPYCfvBy/5xD/GUmmag4PHbuzQ='
WHERE
key_id = '636970a5bb522620fe1013010b1cca82de80afaae8ffae467c135090b04010fb'
AND (
token = '9ZaDNQqZgbr4WorUskPYCfvBy/5xD/GUmmag4PHbuzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)