UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zmCGpgy2TRdjzFtkEZd2Q/Y5TFfK2Iwy8kfbzKVeQic='
WHERE
key_id = '18577e50ddaaf854312fb86563eaa932176c8e6e998f7cd38a9a06cca5c1651b'
AND (
token = 'zmCGpgy2TRdjzFtkEZd2Q/Y5TFfK2Iwy8kfbzKVeQic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)