UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Kbc6qJJ98D/cL6oXW1KUoMmaEGRdN3WklRwgaUFCEvs='
WHERE
key_id = '4b54cb5e6e62ac17a5be45016d3e105481275a7134100a5d4dc8f0d12c44013f'
AND (
token = 'Kbc6qJJ98D/cL6oXW1KUoMmaEGRdN3WklRwgaUFCEvs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)