UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm4bF02ceCRt9vTXTTAri+giBXpRX2qUx7nshpOVMaWk='
WHERE
key_id = '03386cd6037a89c856ea7ae8ac7edf1fba20d2cbbcfe62fcde92838836b7b3f9'
AND (
token = 'm4bF02ceCRt9vTXTTAri+giBXpRX2qUx7nshpOVMaWk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)