UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ltGcFa4B8IP0MrWMdlMTw42Bp4/K81HtTSVeeZaAqg='
WHERE
key_id = '6c2616467fa196d1b67b81baf763edb385014ddeca6860c5a0ed0f6d24183410'
AND (
token = '+ltGcFa4B8IP0MrWMdlMTw42Bp4/K81HtTSVeeZaAqg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)