UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QUDS67bWGn/tF8G1ai+VT7mlan/6zEwnlIt/GniLWIQ=' 
WHERE 
  key_id = '6b377b8a540ec58cd877c2c7cd1258c467aac8f6d7c70f05556a3e4450a37f68' 
  AND (
    token = 'QUDS67bWGn/tF8G1ai+VT7mlan/6zEwnlIt/GniLWIQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029