UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '37h0u6raWAgpKNNbql0SG2U2OSTEpSPezs9hFIkqSKQ='
WHERE
key_id = '781516ca8a2002578a5afca93c30ce45058d2b467793d74530136c36f0dfb927'
AND (
token = '37h0u6raWAgpKNNbql0SG2U2OSTEpSPezs9hFIkqSKQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)