UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wP4YNy6hi7t5i/iGEkAsiVKtWe2e8BN3GbNb+rhCKRM='
WHERE
key_id = 'f468919db978ac9f4f58abf3dc52a4a1b4ed0099255a61a71feb928eb4b7f420'
AND (
token = 'wP4YNy6hi7t5i/iGEkAsiVKtWe2e8BN3GbNb+rhCKRM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)